﻿using System;
using System.Diagnostics;
using Autodesk.Revit.Attributes;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using YArchitech.Controls;
using YArchitech.LIB;

namespace YArchitech.HVAC
{
	[Transaction(TransactionMode.Manual)]
	[Regeneration(RegenerationOption.Manual)]
	public class cmdAboutContact : IExternalCommand
	{
		public Result Execute(ExternalCommandData cmdData, ref string messages, ElementSet elements)
		{
			Result result;
			try
			{
				Process.Start(Product.GetEmailURL());
				result = Autodesk.Revit.UI.Result.Succeeded;
			}
			catch
			{
				YJKMessageBox.Show("请启动IE打开电子邮箱网页，发送邮件到 BIM@hongye.com.cn");
				result = Autodesk.Revit.UI.Result.Succeeded;
			}
			return result;
		}
	}
}
